package org.dtrd.modules.archive.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dtrd.modules.questionnaire.entity.bean.PatientBasicInfo;

import java.io.Serializable;
import java.util.Date;


/**
 * <p>
 * 既往病史和过敏史
 * </p>
 *
 * @author QR
 * @since 2021-11-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dtrd_ent_rd_archive_anamnesis")
public class DtrdEntRdArchiveAnamnesis implements Serializable {


    @TableId(value = "data_id", type = IdType.AUTO)
    private Integer dataId;

    /**
     * 患者ID
     */
    @TableField("patient_id")
    private Integer patientId;

    /**
     * 记录时间
     */
    @TableField("record_date")
    private Date recordDate;

    /**
     * 有无低血糖发生史
     */
    @TableField("hypoglycemia_is_exist")
    private Integer hypoglycemiaIsExist;

    /**
     * 低血糖原因
     */
    @TableField("hypoglycemia_cause")
    private String hypoglycemiaCause;

    /**
     * 低血糖原因其他
     */
    @TableField("hypoglycemia_cause_other")
    private String hypoglycemiaCauseOther;

    /**
     * 低血糖症状有无
     */
    @TableField("hypoglycemia_if_symptom")
    private Integer hypoglycemiaIfSymptom;

    /**
     * 低血糖症状
     */
    @TableField("hypoglycemia_symptom")
    private String hypoglycemiaSymptom;

    @TableField("hypoglycemia_symptom_other")
    private String hypoglycemiaSymptomOther;

    /**
     * 低血糖发生频率
     */
    @TableField("hypoglycemia_frequency")
    private String hypoglycemiaFrequency;

    /**
     * 有无糖尿病酮症酸中毒发生史
     */
    @TableField("ketoacidosis")
    private Integer ketoacidosis;

    /**
     * 糖尿病酮症酸中毒原因
     */
    @TableField("ketoacidosis_cause")
    private String ketoacidosisCause;

    /**
     * 糖尿病酮症酸中毒原因其他
     */
    @TableField("ketoacidosis_cause_other")
    private String ketoacidosisCauseOther;

    /**
     * 糖尿病酮症酸中毒程度
     */
    @TableField("ketoacidosis_degree")
    private Integer ketoacidosisDegree;

    /**
     * 糖尿病酮症酸中毒发生频率
     */
    @TableField("ketoacidosis_frequency")
    private String ketoacidosisFrequency;

    /**
     * 糖尿病酮症酸中毒尿胴体检查
     */
    @TableField("ketoacidosis_urine_ketone")
    private Integer ketoacidosisUrineKetone;

    /**
     * 糖尿病酮症酸中毒血胴体检查
     */
    @TableField("ketoacidosis_blood_ketone")
    private String ketoacidosisBloodKetone;

    /**
     * 有无糖尿病高渗综合征发生史
     */
    @TableField("dnhs")
    private Integer dnhs;

    /**
     * 糖尿病高渗综合征发生频率
     */
    @TableField("dnhs_frequency")
    private String dnhsFrequency;

    /**
     * 有无糖尿病乳酸酸中毒发生史
     */
    @TableField("lactic_acidosis")
    private Integer lacticAcidosis;

    /**
     * 糖尿病乳酸酸中毒发生频率
     */
    @TableField("lactic_acidosis_frequency")
    private String lacticAcidosisFrequency;

    /**
     * 有无其他原因导致肾脏疾病
     */
    @TableField("kidney")
    private Integer kidney;

    /**
     * 所患肾脏疾病
     */
    @TableField("kidney_disease")
    private String kidneyDisease;

    /**
     * 所患肾脏疾病其他
     */
    @TableField("kidney_disease_other")
    private String kidneyDiseaseOther;

    /**
     * 所患肾脏疾病确诊日期
     */
    @TableField("kidney_disease_date")
    private Date kidneyDiseaseDate;

    /**
     * 所患肾脏疾病相关检查
     */
    @TableField("kidney_disease_checks")
    private String kidneyDiseaseChecks;

    /**
     * 尿常规(尿蛋白)
     */
    @TableField("kidney_pro")
    private Integer kidneyPro;

    /**
     * 尿白蛋白/尿肌酐（ACR）
     */
    @TableField("kidney_acr")
    private Float kidneyAcr;

    /**
     * 所患肾脏疾病相关检查其他
     */
    @TableField("kidney_disease_checks_other")
    private String kidneyDiseaseChecksOther;

    /**
     * 血清肌酐（Cr）
     */
    @TableField("kidney_cr")
    private Float kidneyCr;

    /**
     * 肾小球滤过率（GFR）
     */
    @TableField("kidney_gfr")
    private Float kidneyGfr;

    /**
     * 内生肌酐清除率
     */
    @TableField("kidney_ccr")
    private Float kidneyCcr;

    /**
     * 高血压
     */
    @TableField("hbp")
    private Integer hbp;

    /**
     * 是否服用降压药物, 1-是,2-否
     */
    @TableField("hbp_medicine")
    private Integer hbpMedicine;

    /**
     * 高血压确诊时间
     */
    @TableField("hbp_date")
    private Date hbpDate;

    /**
     * 高脂血症
     */
    @TableField("hyperlipidemia")
    private Integer hyperlipidemia;

    /**
     * 高脂血症确诊日期
     */
    @TableField("hyperlipidemia_date")
    private Date hyperlipidemiaDate;

    /**
     * 是否服用降脂药物
     */
    @TableField("hyperlipidemia_if_medicine")
    private Integer hyperlipidemiaIfMedicine;

    /**
     * 高甘油三脂血症
     */
    @TableField("hyperlipidemia_hypertriglyceridemia")
    private Integer hyperlipidemiaHypertriglyceridemia;

    /**
     * 高胆固醇血症
     */
    @TableField("hyperlipidemia_hypercholesterolemia")
    private Integer hyperlipidemiaHypercholesterolemia;

    /**
     * 心血管疾病
     */
    @TableField("cardiovascular_diseases")
    private Integer cardiovascularDiseases;

    /**
     * 确诊日期
     */
    @TableField("cardiovascular_diseases_date")
    private Date cardiovascularDiseasesDate;

    /**
     * 冠心病类型
     */
    @TableField("coronary_heart_disease")
    private String coronaryHeartDisease;

    /**
     * 冠心病类型其他
     */
    @TableField("coronary_heart_disease_other")
    private String coronaryHeartDiseaseOther;

    /**
     * 心绞痛
     */
    @TableField("angina_pectoris")
    private String anginaPectoris;

    /**
     * 心机梗死
     */
    @TableField("myocardial_infarction")
    private Integer myocardialInfarction;

    /**
     * 心机梗死描述
     */
    @TableField("myocardial_infarction_other")
    private String myocardialInfarctionOther;

    /**
     * 心功能不全
     */
    @TableField("heart_failure")
    private Integer heartFailure;

    /**
     * 心血管疾病相关检查
     */
    @TableField("cardiovascular_diseases_checks")
    private String cardiovascularDiseasesChecks;

    /**
     * 心血管疾病其他
     */
    @TableField("cardiovascular_diseases_other")
    private String cardiovascularDiseasesOther;

    /**
     * 脑血管疾病
     */
    @TableField("cerebrovascular_disease")
    private Integer cerebrovascularDisease;

    /**
     * 脑血管疾病确诊时间
     */
    @TableField("cerebrovascular_disease_date")
    private Date cerebrovascularDiseaseDate;

    /**
     * 脑卒中
     */
    @TableField("stroke")
    private Integer stroke;

    /**
     * 脑卒其他症状
     */
    @TableField("stroke_other")
    private String strokeOther;

    /**
     * 急性脑缺血
     */
    @TableField("acute_cerebral_ischemia")
    private Integer acuteCerebralIschemia;

    /**
     * 短暂性脑缺血发作
     */
    @TableField("transient_ischemic_attack")
    private Integer transientIschemicAttack;

    /**
     * 动脉粥样硬化性CCVD
     */
    @TableField("atherosclerotic_ccvd")
    private Integer atheroscleroticCcvd;

    /**
     * 脑血管疾病相关检查
     */
    @TableField("cerebrovascular_disease_checks")
    private String cerebrovascularDiseaseChecks;

    /**
     * 脑血管疾病其他
     */
    @TableField("cerebrovascular_disease_other")
    private String cerebrovascularDiseaseOther;

    /**
     * 周围血管疾病
     */
    @TableField("peripheral_vascular_disease")
    private Integer peripheralVascularDisease;

    /**
     * 周围血管疾病确认日期
     */
    @TableField("peripheral_vascular_disease_date")
    private Date peripheralVascularDiseaseDate;

    /**
     * 所患周围血管疾病
     */
    @TableField("peripheral_vascular_diseases")
    private String peripheralVascularDiseases;

    /**
     * 肝衰竭
     */
    @TableField("hepatic_failure")
    private Integer hepaticFailure;

    /**
     * 恶性肿瘤
     */
    @TableField("malignant_tumor")
    private Integer malignantTumor;

    /**
     * 恶性肿瘤预期寿命
     */
    @TableField("malignant_tumor_life")
    private Integer malignantTumorLife;

    /**
     * 癫痫
     */
    @TableField("epilepsy")
    private Integer epilepsy;

    /**
     * 青光眼
     */
    @TableField("glaucoma")
    private Integer glaucoma;

    /**
     * 白内障
     */
    @TableField("cataract")
    private Integer cataract;

    /**
     * 白内障术后
     */
    @TableField("cataract_after_operation")
    private Integer cataractAfterOperation;

    /**
     * 多囊卵巢综合征
     */
    @TableField("pcos")
    private Integer pcos;

    /**
     * 一过性类固醇性糖尿病
     */
    @TableField("steroid_diabetes")
    private Integer steroidDiabetes;

    /**
     * 败血症
     */
    @TableField("septicemia")
    private Integer septicemia;

    /**
     * 血栓栓塞一年内
     */
    @TableField("thromboembolism")
    private Integer thromboembolism;

    /**
     * 血栓形成一年内
     */
    @TableField("thrombosis")
    private Integer thrombosis;

    /**
     * 慢性肝病
     */
    @TableField("chronic_liver")
    private Integer chronicLiver;

    /**
     * 脾切除
     */
    @TableField("splenectomy")
    private Integer splenectomy;

    /**
     * 老年痴呆
     */
    @TableField("senile_dementia")
    private Integer senileDementia;

    /**
     * 精神障碍
     */
    @TableField("mental_disorder")
    private Integer mentalDisorder;

    /**
     * 智力障碍
     */
    @TableField("mental_retardation")
    private Integer mentalRetardation;

    /**
     * 视力障碍
     */
    @TableField("visual_impairment")
    private Integer visualImpairment;

    /**
     * 截肢
     */
    @TableField("amputation")
    private Integer amputation;

    /**
     * 有无药物过敏史
     */
    @TableField("allergy")
    private Integer allergy;

    /**
     * 阿司匹林过敏
     */
    @TableField("allergy_aspirin")
    private Integer allergyAspirin;

    /**
     * 水杨酸过敏
     */
    @TableField("allergy_salicylic")
    private Integer allergySalicylic;

    /**
     * 他汀类药物过敏
     */
    @TableField("allergy_statins")
    private Integer allergyStatins;

    /**
     * 其他过敏
     */
    @TableField("allergy_other")
    private String allergyOther;

    /**
     * 药物过敏史多选备用
     */
    @TableField("drug_allergy")
    private String drugAllergy;

    /**
     * 巨大婴儿生产史
     */
    @TableField("giant_baby_production")
    private Integer giantBabyProduction;

    /**
     * 妊娠期显性糖尿病史
     */
    @TableField("dominant_gestational_diabetes")
    private Integer dominantGestationalDiabetes;

    /**
     * 早发性心血管疾病家族史
     */
    @TableField("family_early_onset_cardiovascular")
    private Integer familyEarlyOnsetCardiovascular;

    /**
     * 2型糖尿病家族史
     */
    @TableField("family_diabetes2")
    private Integer familyDiabetes2;

    /**
     * 既往病史
     */
    @TableField("medical_history")
    private String medicalHistory;

    /**
     * 过敏史
     */
    @TableField("allergy_history")
    private String allergyHistory;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    @TableField("is_del")
    @TableLogic
    private Integer isDel;

    /**
     * 低血糖发生史是否确认完成, 1-是, 0-否
     */
    @TableField("hypoglycemia_is_finished")
    private Integer hypoglycemiaIsFinished;

    /**
     * 糖尿病酮症酸中毒发生史是否确认完成, 1-是, 0-否
     */
    @TableField("ketosis_is_finished")
    private Integer ketosisIsFinished;

    /**
     * 糖尿病高渗综合征发生史是否确认完成, 1-是, 0-否
     */
    @TableField("hypertonic_is_finished")
    private Integer hypertonicIsFinished;

    /**
     * 糖尿病乳酸酸中毒发生史是否确认完成, 1-是, 0-否
     */
    @TableField("lactic_acidosis_is_finished")
    private Integer lacticAcidosisIsFinished;

    /**
     * 其他原因导致肾脏疾病是否确认完成, 1-是, 0-否
     */
    @TableField("kidney_is_finished")
    private Integer kidneyIsFinished;

    /**
     * 其他病史是否确认完成, 1-是, 0-否
     */
    @TableField("other_is_finished")
    private Integer otherIsFinished;

    /**
     * 痛风史是否确认完成, 1-是, 0-否
     */
    @TableField("gout_is_finished")
    private Integer goutIsFinished;

    /**
     * 痛风史
     */
    @TableField("gout")
    private Integer gout;

    /**
     * 痛风史情况
     */
    @TableField("gout_cur_status")
    private Integer goutCurStatus;

    /**
     * 血尿酸
     */
    @TableField("gout_bua")
    private Float goutBua;


    public DtrdEntRdArchiveAnamnesis init() {
        isDel = 0;
        createTime = new Date();
        return this;
    }

    public DtrdEntRdArchiveAnamnesis parseFromDTO(PatientBasicInfo dto) {
        gout = dto.getGout();
        goutBua = dto.getGoutBua();
        goutCurStatus = dto.getGoutStatus();
        return this;
    }
}
